import { Navigate } from "react-router-dom";
import List from "../views/List";
import Detail from "../views/Deatil";
import Add from "../views/Add";
import File from "../views/File";
import Gaode from "../views/Gaode"
function WrapLogin(props){
    if(localStorage.getItem("isLogin")){
        return props.children
    }else{
        return <Navigate to="/login"/>
    }
}
const MyRoute=[
    {
        path:"/list",
        element:<List></List>
    },
    {
        path:"/detail",
        element:<Detail></Detail>
    },
    {
        path:"/add",
        element:<Add></Add>
    },
    {
        path:"/file",
        element:<File></File>
    },
    {
        path:"/gaode",
        element:<Gaode></Gaode>
    }
]
export default MyRoute;